const mongoose= require('mongoose');
const testedSchema=new mongoose.Schema({
    score:String,
    time:String,
    studentOption:[],
    testScore:[],
    studentId:{
        type:mongoose.SchemaTypes.ObjectId,
        ref:'studentModel'
    },
    testId:{
        type:mongoose.SchemaTypes.ObjectId,
        ref:'testModel'
    }
})
mongoose.model('testedModel',testedSchema,'testeds');

module.exports.modelName='testedModel';
module.exports.getAllTestedModel=async function(){
    return await mongoose.model('testedModel').find({}).populate('studentId').populate('testId');
    
}